package com.linked.goods.shop.service.impl;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.linked.goods.shop.bean.po.ShopInfoPO;
import com.linked.goods.shop.mapper.IShopInfoMapper;
import com.linked.goods.shop.service.IShopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author :dbq
 * @date : 2023/5/25 10:22
 * @description : desc
 */
@Service
@Slf4j
public class ShopServiceImpl implements IShopService {

    private final IShopInfoMapper shopInfoMapper;

    private final ObjectMapper mapper;

    public ShopServiceImpl(IShopInfoMapper shopInfoMapper, ObjectMapper mapper) {
        this.shopInfoMapper = shopInfoMapper;
        this.mapper = mapper;
    }

    @Override
    public boolean addShop(ShopInfoPO shopInfoPO) throws Exception {
        return shopInfoMapper.insert(shopInfoPO) > 0;
    }
}
